/**
 * @a https://leetcode.cn/problems/check-permutation-lcci/
 */

#include "common.h"

class Solution {
public:
    bool CheckPermutation(string s1, string s2) {
        int arr[26] = {0};
        for(char c1:s1){
            arr[c1-'a']++;
        }
        for(char c2:s2){
            arr[c2-'a']--;
        }
        for(auto cnt:arr){
            if(cnt != 0) return false;
        }
        return true;
    }
};